package cn.wolfcode.luowowo.acticle.service.impl;


import cn.wolfcode.luowowo.acticle.domain.DestinationTag;
import cn.wolfcode.luowowo.acticle.mapper.DestinationTagMapper;
import cn.wolfcode.luowowo.acticle.service.IDestinationTagService;
import cn.wolfcode.luowowo.acticle.service.IDestinationTagService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class DestinationTagServiceImpl implements IDestinationTagService {
    @Autowired
    private DestinationTagMapper destinationTagMapper;



    @Override
    public List<DestinationTag> list() {
        return destinationTagMapper.selectAll();
    }

    @Override
    public List<DestinationTag> getdestinationTagByDthId(Long hitId) {
        return destinationTagMapper.selectDestinationTagByDthId(hitId);
    }



    @Override
    public DestinationTag getByPrimaryKey(Long tagId) {

        return  destinationTagMapper.selectByPrimaryKey(tagId);
    }

    @Override
    public List<String> getDestIdByTagId(String tagId) {


        String[] strTagId = tagId.split(",");
        List<String> strDestId = destinationTagMapper.selectDestIdByTagId(strTagId);


        return strDestId;
    }

    @Override
    public List<DestinationTag> getSeason() {
        return destinationTagMapper.selectSeason();
    }


}
